//
//  AttentionTiltleView.m
//  Arts1
//
//  Created by apple on 15/9/6.
//  Copyright (c) 2015年 Arts1. All rights reserved.
//

#import "AttentionTiltleView.h"
#import "AllHeader.h"

@implementation AttentionTiltleView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        [self addSubview:self.btnFriend];
        [self addSubview:self.btnSchool];
        [self addSubview:self.btnStudio];
        [self addSubview:self.lineFristLabel];
        [self addSubview:self.lineSecondLabel];
        [self addSubview:self.lineTopLabel];
    }
    return self;
}

- (UIButton *)btnFriend
{
    if (!_btnFriend)
    {
        self.btnFriend = [UIButton buttonWithType:UIButtonTypeCustom];
        
        _btnFriend.frame = CGRectMake(0, 0, SCREEN_WIDTH / 3 - 2, 44 * HEIGHT);
        
        _btnFriend.tag = 1070;
        
        [_btnFriend setTitle:@"好友" forState:UIControlStateNormal];
        
        _btnFriend.titleLabel.font = [UIFont systemFontOfSize: 13.0];
        
        [_btnFriend setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        
        [_btnFriend addTarget:self action:@selector(tapFriendView:) forControlEvents:UIControlEventTouchUpInside];

    }
    return _btnFriend;
}
- (UIButton *)btnSchool
{
    if (!_btnSchool)
    {
        self.btnSchool = [UIButton buttonWithType:UIButtonTypeCustom];
        
        _btnSchool.frame = CGRectMake(_btnFriend.right + 2, 0, SCREEN_WIDTH / 3 - 2, 44 * HEIGHT);
        
        _btnSchool.tag = 1071;
        
        [_btnSchool setTitle:@"高校" forState:UIControlStateNormal];
        
        _btnSchool.titleLabel.font = [UIFont systemFontOfSize: 13.0];
        
        [_btnSchool setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
        
        
    }
    return _btnSchool;
}
- (UIButton *)btnStudio
{
    if (!_btnStudio)
    {
        self.btnStudio = [UIButton buttonWithType:UIButtonTypeCustom];
        
        _btnStudio.frame = CGRectMake(_btnSchool.right + 2, 0, SCREEN_WIDTH / 3 - 2, 44 * HEIGHT);
        
        _btnStudio.tag = 1072;
        
        [_btnStudio setTitle:@"画室" forState:UIControlStateNormal];
        
        _btnStudio.titleLabel.font = [UIFont systemFontOfSize: 13.0];

        [_btnStudio setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    }
    return _btnStudio;
}

- (UILabel *)lineFristLabel
{
    if (!_lineFristLabel)
    {
        self.lineFristLabel = [[UILabel alloc] initWithFrame:CGRectMake(_btnFriend.right, 5, 0.1, 30 * HEIGHT)];
        _lineFristLabel.backgroundColor = [UIColor blackColor];
        _lineFristLabel.alpha = 1.0;
    }
    return _lineFristLabel;
}

- (UILabel *)lineSecondLabel
{
    if (!_lineSecondLabel)
    {
        self.lineSecondLabel = [[UILabel alloc] initWithFrame:CGRectMake(_btnSchool.right, 5, 0.1, 30 * HEIGHT)];
        _lineSecondLabel.backgroundColor = [UIColor blackColor];
        _lineSecondLabel.alpha = 1.0;
    }
    return _lineSecondLabel;
}

- (UILabel *)lineTopLabel
{
    if (!_lineTopLabel)
    {
        self.lineTopLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 0.1)];
        _lineTopLabel.backgroundColor = [UIColor blackColor];
        _lineTopLabel.alpha = 1;
    }
    return _lineTopLabel;
}

/**
 *  好友页面
 *
 */
- (void)tapFriendView:(UIButton *)tapFriendView
{
    NSLog(@"11111");
}

@end
